package com.ruoyi.bizsys.service.impl;

import java.util.List;
import java.util.Arrays;
                                                                                                                                                                                import com.ruoyi.common.utils.DateUtils;
            import org.springframework.stereotype.Service;
    import com.ruoyi.bizsys.mapper.CustBvnMatchMapper;
import com.ruoyi.bizsys.domain.CustBvnMatch;
import com.ruoyi.bizsys.service.ICustBvnMatchService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;


/**
 * BVN Match
Service业务层处理
 *
 * @author african-loan
 * @date 2021-12-30
 */
@Service
public class CustBvnMatchServiceImpl extends ServiceImpl<CustBvnMatchMapper,CustBvnMatch> implements ICustBvnMatchService {

    /**
     * 查询BVN Match

     *
     * @param id BVN Match
ID
     * @return BVN Match

     */
    @Override
    public CustBvnMatch selectCustBvnMatchById(Long id) {
        return this.getById(id);
    }

    /**
     * 查询BVN Match
列表
     *
     * @param custBvnMatch BVN Match

     * @return BVN Match

     */
    @Override
    public List<CustBvnMatch> selectCustBvnMatchList(CustBvnMatch custBvnMatch) {
        return this.list(new QueryWrapper<>(custBvnMatch).last("order by id desc"));
    }

    /**
     * 新增BVN Match

     *
     * @param custBvnMatch BVN Match

     * @return 结果
     */
            @Override
    public int insertCustBvnMatch(CustBvnMatch custBvnMatch) {
                                                                                                                                                                                                                                                                                                                                                custBvnMatch.setCreateTime(DateUtils.getNowDate());
                            return baseMapper.insert(custBvnMatch);
    }

    /**
     * 修改BVN Match

     *
     * @param custBvnMatch BVN Match

     * @return 结果
     */
            @Override
    public int updateCustBvnMatch(CustBvnMatch custBvnMatch) {
                                                                                                                                                                                                                                                                                                        custBvnMatch.setUpdateTime(DateUtils.getNowDate());
                                                                    return baseMapper.updateById(custBvnMatch);
    }

    /**
     * 批量删除BVN Match

     *
     * @param ids 需要删除的BVN Match
ID
     * @return 结果
     */
            @Override
    public int deleteCustBvnMatchByIds(Long[] ids) {
        return baseMapper.deleteBatchIds(Arrays.asList(ids));
    }

    /**
     * 删除BVN Match
信息
     *
     * @param id BVN Match
ID
     * @return 结果
     */
    @Override
    public int deleteCustBvnMatchById(Long id) {
        return baseMapper.deleteById(id);
    }

}
